package com.conference.repository;

import com.conference.entity.UserConference;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserConferenceRepository extends JpaRepository<UserConference, Long> {
    
    /**
     * 根据会议ID查找所有参会人员座位信息
     */
    List<UserConference> findByMeetingId(Long meetingId);

    /**
     * 根据会议ID和座位号查找参会人员座位信息
     */
    UserConference findByMeetingIdAndRowNumAndSeatNum(Long meetingId, Integer rowNum, Integer seatNum);

    /**
     * 根据会议ID和座位号删除参会人员座位信息
     */
    void deleteByMeetingIdAndRowNumAndSeatNum(Long meetingId, Integer rowNum, Integer seatNum);

    /**
     * 根据会议ID删除所有参会人员座位信息
     */
    void deleteByMeetingId(Long meetingId);
} 